import React, { Component } from 'react';
// 引入密码和短信组件
import Normallogin from './NormalLogin'
import Mobilelogin from './MobileLogin'
// 引入antd-ui和css
import { Card ,Tabs} from 'antd';
import '@/assets/css/login.css';
const { TabPane } = Tabs;
class Login extends Component {
    // 切换选项卡
    onChange = (key) => {
        // console.log(key);
    };
    render() {
        return (
                <div className="site-card-border-less-wrapper">
                    <Card
                    bordered={false}
                    style={{
                        width: 300,
                    }}
                    >
                        <Tabs centered={true} tabBarGutter={80} defaultActiveKey="1" onChange={this.onChange}>
                            <TabPane tab="密码登录" key="1">
                                {/* 密码登录组件 */}
                                <Normallogin></Normallogin>
                            </TabPane>
                            <TabPane tab="短信登录" key="2">
                                {/* 短信登录组件 */}
                                <Mobilelogin></Mobilelogin>
                            </TabPane>
                        </Tabs>
                    </Card>
                </div>
        );
    }
}

export default Login;
